package com.liguoliang.helloworld.service;

import java.util.List;

import org.athenasource.framework.eo.core.EOContext;
import org.athenasource.framework.eo.query.EJBQLSelect;
import org.athenasource.framework.eo.web.service.AbstractService;

public class DeptService extends AbstractService {

	/**
	 * 加载Department列表
	 * @return
	 */
	public List<Object> loadDepts() {
		EOContext eoContext = createEOContext(); // 创建Athena EoContext;

		String strEJBQL = "SELECT dept FROM Department dept"; // 加载所有Department;
		EJBQLSelect select = eoContext.createSelectQuery(strEJBQL);

		return select.getResultList(); // 执行EJBQL, 并返回所有数据;
	}
}
